/**
 * Created by coder on 2018/3/28.
 */
import {ACTION_TASK} from './action'
import initState from './state'


export default (state = initState.task,action) => {
    switch(action.type){
        case ACTION_TASK.CHANGE_STATE:
            const {taskstate,searchType,searchStarttime,searchEndtime,searchValue} = action.payload;
            return {
                state:taskstate,
                searchType:searchType,
                search_start_time:searchStarttime,
                search_end_time:searchEndtime,
                search_value: searchValue
            };
        default:
            return state;
    }
}